home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX Base Documentation 1998 November
/
IRIX 6.5.2 Base Documentation November 1998.img
/
usr
/
share
/
catman
/
p_man
/
cat3
/
libelfutil
/
xlate_init_fd.z
/
xlate_init_fd
Wrap
Text File
|
1998-10-30
|
18KB
|
329 lines
XXXXLLLLAAAATTTTEEEE____IIIINNNNIIIITTTT____FFFFDDDD((((3333EEEE)))) XXXXLLLLAAAATTTTEEEE____IIIINNNNIIIITTTT____FFFFDDDD((((3333EEEE))))
NNNNAAAAMMMMEEEE
_xxxx_llll_aaaa_tttt_eeee______iiii_nnnn_iiii_tttt______ffff_dddd: _xxxx_llll_aaaa_tttt_eeee______iiii_nnnn_iiii_tttt______eeee_llll_ffff - open translation section
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
_####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_eeee_llll_ffff_...._hhhh_>>>>
_####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_llll_iiii_bbbb_eeee_llll_ffff_...._hhhh_>>>>
_####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_dddd_wwww_aaaa_rrrr_ffff_...._hhhh_>>>>
_####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_llll_iiii_bbbb_dddd_wwww_aaaa_rrrr_ffff_...._hhhh_>>>>
_####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_cccc_mmmm_pppp_llll_rrrr_ssss_////_xxxx_llll_aaaa_tttt_eeee_...._hhhh_>>>>
_####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_llll_iiii_bbbb_XXXX_llll_aaaa_tttt_eeee_...._hhhh_>>>>
_iiii_nnnn_tttt _xxxx_llll_aaaa_tttt_eeee______iiii_nnnn_iiii_tttt______ffff_dddd_((((_iiii_nnnn_tttt _ffff_dddd_,,,,
_iiii_nnnn_tttt _oooo_pppp_eeee_nnnn______dddd_eeee_bbbb_uuuu_gggg______tttt_aaaa_bbbb_llll_eeee_,,,,
_xxxx_llll_aaaa_tttt_eeee______tttt_aaaa_bbbb_llll_eeee______cccc_oooo_nnnn _****_rrrr_eeee_tttt_uuuu_rrrr_nnnn_eeee_dddd______tttt_aaaa_bbbb_llll_eeee______pppp_oooo_iiii_nnnn_tttt_eeee_rrrr_))))_;;;;
_iiii_nnnn_tttt _xxxx_llll_aaaa_tttt_eeee______iiii_nnnn_iiii_tttt______eeee_llll_ffff_((((_EEEE_llll_ffff _****_eeee_llll_ffff______hhhh_aaaa_nnnn_dddd_llll_eeee_,,,,
_iiii_nnnn_tttt _oooo_pppp_eeee_nnnn______dddd_eeee_bbbb_uuuu_gggg______tttt_aaaa_bbbb_llll_eeee_,,,,
_xxxx_llll_aaaa_tttt_eeee______tttt_aaaa_bbbb_llll_eeee______cccc_oooo_nnnn _****_rrrr_eeee_tttt_uuuu_rrrr_nnnn_eeee_dddd______tttt_aaaa_bbbb_llll_eeee______pppp_oooo_iiii_nnnn_tttt_eeee_rrrr_))))_;;;;
_iiii_nnnn_tttt _xxxx_llll_aaaa_tttt_eeee______nnnn_aaaa_mmmm_eeee_dddd______iiii_nnnn_iiii_tttt______ffff_dddd_((((_iiii_nnnn_tttt _ffff_dddd_,,,,
_cccc_oooo_nnnn_ssss_tttt _cccc_hhhh_aaaa_rrrr _**** _xxxx_llll_aaaa_tttt_eeee______ssss_eeee_cccc_tttt_iiii_oooo_nnnn______nnnn_aaaa_mmmm_eeee_,,,,
_xxxx_llll_aaaa_tttt_eeee______tttt_aaaa_bbbb_llll_eeee______cccc_oooo_nnnn _****_rrrr_eeee_tttt_uuuu_rrrr_nnnn_eeee_dddd______tttt_aaaa_bbbb_llll_eeee______pppp_oooo_iiii_nnnn_tttt_eeee_rrrr_))))_;;;;
_iiii_nnnn_tttt _xxxx_llll_aaaa_tttt_eeee______nnnn_aaaa_mmmm_eeee_dddd______iiii_nnnn_iiii_tttt______eeee_llll_ffff_((((_EEEE_llll_ffff _****_eeee_llll_ffff______hhhh_aaaa_nnnn_dddd_llll_eeee_,,,,
_cccc_oooo_nnnn_ssss_tttt _cccc_hhhh_aaaa_rrrr _**** _xxxx_llll_aaaa_tttt_eeee______ssss_eeee_cccc_tttt_iiii_oooo_nnnn______nnnn_aaaa_mmmm_eeee_,,,,
_xxxx_llll_aaaa_tttt_eeee______tttt_aaaa_bbbb_llll_eeee______cccc_oooo_nnnn _****_rrrr_eeee_tttt_uuuu_rrrr_nnnn_eeee_dddd______tttt_aaaa_bbbb_llll_eeee______pppp_oooo_iiii_nnnn_tttt_eeee_rrrr_))))_;;;;
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
These are used to get (open) a handle on an Elf section containing
translation information. The handle allows one to call any of the
consumer functions. it is unspecified which
xxxxllllaaaatttteeee____iiiinnnniiiitttt____ffffdddd takes as arguments:
_f_d is an IRIX file-descriptor which must be open(2) for reading on
an Elf object file.
_o_p_e_n__d_e_b_u_g__t_a_b_l_e
indicates which translation section to open. If
_X_L_A_T_E__O_P_E_N__S_T_D__T_A_B_L_E (0), then the first section with _s_h__t_y_p_e
_S_H_T__M_I_P_S__X_L_A_T_E is opened. If _X_L_A_T_E__O_P_E_N__S_T_D__T_A_B_L_E (1), then the
first section with _s_h__t_y_p_e _S_H_T__M_I_P_S__X_L_A_T_E__D_E_B_U_G is opened.
_X_L_A_T_E__O_P_E_N__S_T_D__T_A_B_L_E is the table normally opened by debuggers
and other applictions needing to do address translations. Only
sections with Elf section type _S_H_T__M_I_P_S__X_L_A_T_E,
_S_H_T__M_I_P_S__X_L_A_T_E__D_E_B_U_G, or _S_H_T__M_I_P_S__X_L_A_T_E__O_L_D can be opened.
_r_e_t_u_r_n_e_d__t_a_b_l_e__p_o_i_n_t_e_r
is a pointer to a consumer table handle. If the call to
_x_l_a_t_e__i_n_i_t__f_d is successful, the handle pointed to is set a valid
consumer library handle.
PPPPaaaaggggeeee 1111
XXXXLLLLAAAATTTTEEEE____IIIINNNNIIIITTTT____FFFFDDDD((((3333EEEE)))) XXXXLLLLAAAATTTTEEEE____IIIINNNNIIIITTTT____FFFFDDDD((((3333EEEE))))
xxxxllllaaaatttteeee____iiiinnnniiiitttt____eeeellllffff takes as arguments:
_e_l_f__h_a_n_d_l_e
which must be a valid open pointer on an existing Elf object as
returned by _e_l_f__b_e_g_i_n(3e) and it must allow read access.
_o_p_e_n__d_e_b_u_g__t_a_b_l_e
indicates which translation section to open. If
_X_L_A_T_E__O_P_E_N__S_T_D__T_A_B_L_E (0), then the first section with _s_h__t_y_p_e
_S_H_T__M_I_P_S__X_L_A_T_E is opened. If _X_L_A_T_E__O_P_E_N__S_T_D__T_A_B_L_E (1), then the
first section with _s_h__t_y_p_e _S_H_T__M_I_P_S__X_L_A_T_E__D_E_B_U_G is opened.
_X_L_A_T_E__O_P_E_N__S_T_D__T_A_B_L_E is the table normally opened by debuggers
and other applictions needing to do address translations. Only
sections with Elf section type _S_H_T__M_I_P_S__X_L_A_T_E,
_S_H_T__M_I_P_S__X_L_A_T_E__D_E_B_U_G, or _S_H_T__M_I_P_S__X_L_A_T_E__O_L_D can be opened.
_r_e_t_u_r_n_e_d__t_a_b_l_e__p_o_i_n_t_e_r
is a pointer to a consumer table handle. If the call to
_x_l_a_t_e__i_n_i_t__f_d is successful, the handle pointed to is set to a
valid consumer library handle.
xxxxllllaaaatttteeee____nnnnaaaammmmeeeedddd____iiiinnnniiiitttt____ffffdddd takes as arguments:
_f_d is an IRIX file-descriptor which must be open(2) for reading on
an Elf object file.
_x_l_a_t_e__s_e_c_t_i_o_n__n_a_m_e
indicates which translation section to open. The normal string
passed in is ".MIPS.Xlate" which is the name of the net
(composed) address translation table used by debuggers and other
applictions needing to do address translations. Any Elf section
with _s_h__t_y_p_e _S_H_T__M_I_P_S__X_L_A_T_E, _S_H_T__M_I_P_S__X_L_A_T_E__D_E_B_U_G, or
_S_H_T__M_I_P_S__X_L_A_T_E__O_L_D may be opened.
_r_e_t_u_r_n_e_d__t_a_b_l_e__p_o_i_n_t_e_r
is a pointer to a consumer table handle. If the call to
_x_l_a_t_e__i_n_i_t__f_d is successful, the handle pointed to is set a valid
consumer library handle.
xxxxllllaaaatttteeee____nnnnaaaammmmeeeedddd____iiiinnnniiiitttt____eeeellllffff takes as arguments:
_e_l_f__h_a_n_d_l_e
which must be a valid open pointer on an existing Elf object as
returned by _e_l_f__b_e_g_i_n(3e) and it must allow read access.
_x_l_a_t_e__s_e_c_t_i_o_n__n_a_m_e
indicates which translation section to open. The normal string
passed in is ".MIPS.Xlate" which is the name of the net
(composed) address translation table used by debuggers and other
applictions needing to do address translations. Any Elf section
with _s_h__t_y_p_e _S_H_T__M_I_P_S__X_L_A_T_E, _S_H_T__M_I_P_S__X_L_A_T_E__D_E_B_U_G, or
_S_H_T__M_I_P_S__X_L_A_T_E__O_L_D may be opened.
PPPPaaaaggggeeee 2222
XXXXLLLLAAAATTTTEEEE____IIIINNNNIIIITTTT____FFFFDDDD((((3333EEEE)))) XXXXLLLLAAAATTTTEEEE____IIIINNNNIIIITTTT____FFFFDDDD((((3333EEEE))))
_r_e_t_u_r_n_e_d__t_a_b_l_e__p_o_i_n_t_e_r
is a pointer to a consumer table handle. If the call to
_x_l_a_t_e__i_n_i_t__f_d is successful, the handle pointed to is set to a
valid consumer library handle.
Use -lelfutil -lelf on the link command line to link in the xlate
functions.
You must install the _c_o_m_p_i_l_e_r__e_o_e._h_d_r._i_n_t_e_r_n_a_l subsystem to get the
headers necessary to work with the xlate functions and leb128 functions
they call.
FFFFIIIILLLLEEEESSSS
/usr/include/libXlate.h
/usr/include/cmplrs/xlate.h
/usr/include/elf.h
/usr/include/dwarf.h
/usr/include/libdwarf.h
/usr/lib/libelfutil.a
DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
These return _X_L_A_T_E__T_B__S_T_A_T_U_S__N_O__E_R_R_O_R (_0) on success. In case of error,
a negative number is returned indicating the error. In case of error,
nothing is returned thru the pointer arguments which would return values
on successful call (values might have been changed thru these pointers
but any such changes are not meaningful).
If the requested section does not exist, _X_L_A_T_E__T_B__S_T_A_T_U_S__N_O__X_L_A_T_E is
returned. This is not really an error, just an indication that there is
no such section and there is no value returned thru
_r_e_t_u_r_n_e_d__t_a_b_l_e__p_o_i_n_t_e_r.
_X_L_A_T_E__T_B__S_T_A_T_U_S__S_E_C_T_I_O_N__T_O_O__S_M_A_L_L
means that the translation section is too small to be real or
that there is less space in the section than the translation
section data says it contains.
_X_L_A_T_E__T_B__S_T_A_T_U_S__I_N_C_O_N_S_I_S_T_E_N_T__6_4__B_I_T__I_N_F_O
means that the translation section is marked as a 64bit section
but the a.out or DSO is marked as 32 bit (or vice versa).
_X_L_A_T_E__T_B__S_T_A_T_U_S__B_A_D__T_A_B_L_E_K_I_N_D
The tablekind in the translation section is not one of the
predefined values: something is corrupted or an obsolete
tablekind thought not to exist does exist.
_X_L_A_T_E__T_B__S_T_A_T_U_S__N_O_T__E_L_F
_e_l_f__k_i_n_d(3e) on the file says the file is not a plain Elf file.
PPPPaaaaggggeeee 3333
XXXXLLLLAAAATTTTEEEE____IIIINNNNIIIITTTT____FFFFDDDD((((3333EEEE)))) XXXXLLLLAAAATTTTEEEE____IIIINNNNIIIITTTT____FFFFDDDD((((3333EEEE))))
_X_L_A_T_E__T_B__S_T_A_T_U_S__E_L_F__I_D_E_N_T__B_A_D
_e_l_f__g_e_t_i_d_e_n_t(3e) returns an invalid Elf ident value. The file is
apparently not a valid Elf file.
_X_L_A_T_E__T_B__S_T_A_T_U_S__E_L_F__S_H_D_R__B_A_D
_e_l_f_3_2__g_e_t_s_h_d_r(3e), or _e_l_f_6_4__g_e_t_s_h_d_r(3e) could not find a section
in the Elf file that should be there. Some kind of corruption
(file or data) is occurring. The file is apparently not a valid
Elf file.
_X_L_A_T_E__T_B__S_T_A_T_U_S__N_O__X_L_A_T_E
Normal return when there is no translation section of the
requested type.
_X_L_A_T_E__T_B__S_T_A_T_U_S__N_O__X_L_A_T_E__D_A_T_A
There is a translation section but the section is empty!
Something is wrong with the Elf file.
_X_L_A_T_E__T_B__S_T_A_T_U_S__A_L_L_O_C__F_A_I_L
A call to _m_a_l_l_o_c() or _r_e_a_l_l_o_c() failed.
_X_L_A_T_E__T_B__S_T_A_T_U_S__S_E_C_T_I_O_N__T_O_O__B_I_G
The translation section is so large ( > 31 bits in the size) that
it cannot be handled by the 32-bit version of the library. This
is quite unlikely since translation sections should be much
smaller than the text they refer to and text sections do not get
that big (as of this writing). The application must be rebuilt
as a 64bit application and linked against a 64-bit version of
this library.
_X_L_A_T_E__T_B__S_T_A_T_U_S__E_D_H_R__B_A_D
A call to _e_l_f_3_2__g_e_t_e_h_d_r(3) or _e_l_f_6_4__g_e_t_e_h_d_r(3) (whichever is
appropriate) failed. The object file is damaged or the library
has a bug.
_X_L_A_T_E__T_B__S_T_A_T_U_S__S_T_R_P_T_R__B_A_D
A call to _e_l_f__s_t_r_p_t_r(3) (whichever is appropriate) failed. No
section name strings could be found. The object file is
specially stripped or damaged or the library has a bug.
SSSSEEEEEEEE AAAALLLLSSSSOOOO
libelfutil(5), open(2), xlate(4), xlate_get_info(3e), xlate_address(3e),
xlate_get_reg_rule(3e), xlate_get_all_reg_rules(3e),
xlate_expand_reg_info(3e), xlate_finish(3e), xlate_pro_init(3e),
xlate_pro_finish(3e), xlate_address(3e)
NNNNOOOOTTTTEEEESSSS
For any of these calls to succeed the section contents must also be a
valid translate section.
PPPPaaaaggggeeee 4444
XXXXLLLLAAAATTTTEEEE____IIIINNNNIIIITTTT____FFFFDDDD((((3333EEEE)))) XXXXLLLLAAAATTTTEEEE____IIIINNNNIIIITTTT____FFFFDDDD((((3333EEEE))))
In case there are multiple sections of an Elf object file meeting the
section name and section type criteria above then one of the sections is
opened.
PPPPaaaaggggeeee 5555